package com.tjsinfo.tjsoa.fileDocument.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.json.JSONObject;

import com.tjsinfo.tjsoa.fileDocument.bo.FileDocumentGroupBo;

public class GetFoldAction extends Action{

	private FileDocumentGroupBo documentGroupBo;
	
	public FileDocumentGroupBo getDocumentGroupBo() {
		return documentGroupBo;
	}

	public void setDocumentGroupBo(FileDocumentGroupBo documentGroupBo) {
		this.documentGroupBo = documentGroupBo;
	}

	@Override
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		String[] strings = documentGroupBo.getAllGroup();
		JSONObject object = new JSONObject();
		object.put("test", strings);
		response.getWriter().print(object);
		return super.execute(mapping, form, request, response);
	}
	

	
}
